using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Fields
{
    /// <summary>
    /// <para>Delete Field</para>
    /// <para>Deletes one or more fields from a table, feature class, feature layer, or raster dataset.</para>
    /// <para>从表、要素类、要素图层或栅格数据集中删除一个或多个字段。</para>
    /// </summary>    
    [DisplayName("Delete Field")]
    public class DeleteField : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public DeleteField()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_table">
        /// <para>Input Table</para>
        /// <para>The table containing the fields to be deleted. The existing input table will be modified.</para>
        /// <para>包含要删除的字段的表。将修改现有输入表。</para>
        /// </param>
        /// <param name="_drop_field">
        /// <para>Drop Field</para>
        /// <para>The fields to be dropped from the input table. Only nonrequired fields may be deleted.</para>
        /// <para>要从输入表中删除的字段。只能删除非必填字段。</para>
        /// </param>
        public DeleteField(object _in_table, List<object> _drop_field)
        {
            this._in_table = _in_table;
            this._drop_field = _drop_field;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Delete Field";

        public override string CallName => "management.DeleteField";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_table, _drop_field, _out_table];

        /// <summary>
        /// <para>Input Table</para>
        /// <para>The table containing the fields to be deleted. The existing input table will be modified.</para>
        /// <para>包含要删除的字段的表。将修改现有输入表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_table { get; set; }


        /// <summary>
        /// <para>Drop Field</para>
        /// <para>The fields to be dropped from the input table. Only nonrequired fields may be deleted.</para>
        /// <para>要从输入表中删除的字段。只能删除非必填字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Drop Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _drop_field { get; set; }


        /// <summary>
        /// <para>Update Input Table</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Update Input Table")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_table { get; set; }


        public DeleteField SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}